package com.meatball.iot.driver.smokealarm.data.document

import cn.hutool.core.date.DateTime
import cn.hutool.core.date.DateUtil
import com.meatball.iot.driver.smokealarm.enums.DeviceStatusEnum
import org.springframework.data.annotation.Id
import org.springframework.data.mongodb.core.mapping.Document

/**
 * TODO 烟感数据类
 *
 * @property deviceID 设备ID
 * @property deviceStatus 设备状态
 *
 * @author 张翔宇
 * @since 2024年6月7日
 */
@Document("SMOKE_ALARM")
data class SmokeAlarmDocument(
    @Id
    val id: String? = null,
    val deviceID: String,
    val deviceStatus: DeviceStatusEnum,
    val insertTimestamp: Long = System.currentTimeMillis(),
    val insertTime: String = DateUtil.formatDateTime(DateTime(insertTimestamp)),
)
